

export const getArticleDetail = (id) => {
	return (dispatch, getState, axios) => {
		return axios.get('/front/article/detail?_id=' + id).then((res) => {
			dispatch({
				type: 'change_detail',
				value: res.data.data
			})
		})
	}
}


export const getCommentList = (id) => {
	return (dispatch, getState, axios) => {
		return axios.get('/front/article/comment?articleId=' + id).then((res) => {
			dispatch({
				type: 'change_commentList',
				value: res.data.data
			})
		})
	}
}

export const publishComment = (data) => {
	return (dispatch, getState, axios) => {
		return axios.post('/front/article/comment', data).then(res => {
			return Promise.resolve(res)
		})
	}
}